#!/bin/bash
# 安装的版本
version=18.09.6-3.el7

yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manage --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum-config-manager --enable docker-ce-stable
yum-config-manager --enable docker-ce-test
# yum install -y docker-ce docker-ce-cli containerd.io
yum list docker-ce --showduplicates | sort -r

yum install -y docker-ce-${version} docker-ce-cli-${version} containerd.io-${version}
systemctl start docker